﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using System.Text;

namespace LTJ.WebPage
{
    public partial class ajax : System.Web.UI.Page
    {
        protected internal string ascxpath = "datacontrol/"; //用户控件路径值

        public ajax()
        {
        }
        private void InitializeComponent()
        {
            this.ID = "Ajax_CallBack_Form";
            //base.Load += new EventHandler(this.Page_Load);
        }

        protected override void OnInit(EventArgs e)
        {
            this.InitializeComponent();
            base.OnInit(e);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (base.Request.Params["AjaxTemplate"] != null)
            {
                try
                {
                    this.AjaxCallBackForm.Controls.Add(base.LoadControl(base.Request.Params["AjaxTemplate"].ToLower().EndsWith(".ascx") ? ascxpath + base.Request.Params["AjaxTemplate"] : (ascxpath + base.Request.Params["AjaxTemplate"] + ".ascx")));
                }
                catch
                {
                }
            }
        }
    }


}